import { FC, memo } from 'react';
import styles from './internetStatusIcon.module.less';

interface IInternetStatusIconProps {
  status: number;
}

const InternetStatusIcon: FC<IInternetStatusIconProps> = (props) => {
  const { status } = props;
  let imgSrc = require('@/images/wifi-red.png');
  if (status === 0) {
    imgSrc = require('@/images/wifi-green.png');
  }
  if (status === 1) {
    imgSrc = require('@/images/wifi-red.png');
  }

  return (
    <div>
      <img className={styles.statusImg} src={imgSrc} />
    </div>
  );
};

export default memo(InternetStatusIcon);
